import {customeStruct} from '../utils';
const itf = customeStruct.interface;

const defaultProps = {
    id: 'string',
    code: 'string? | null',
    name: 'string? | null',
    englishName: 'string? | null',
    address: 'string? | null',
    contactNumber: 'string? | null',
    fax: 'string? | null',
    status: 'number',
    remark: 'string? | null'
};

export const List = itf({
    payload: itf({
        content: [itf(Object.assign({
            options: ['string'],
            rowVersion: 'string? | null'
        }, defaultProps))],
        totalElements: 'number',
    })
});

export const Detail = itf({
    payload: itf(Object.assign({
        creatorName: 'string? | null',
        createTime: 'datetime? | null',
        modifierName: 'string? | null',
        modifyTime: 'datetime? | null',
        abandonerName: 'string? | null',
        abandonTime: 'datetime? | null',
        options: ['string'],
        rowVersion: 'string? | null'
    }, defaultProps))
});

